Skip to content

Conversation

@taylorwilsdon
Copy link
Contributor

@taylorwilsdon taylorwilsdon commented Jun 2, 2025

Related GitHub Issue

Closes: #4241

Description

Fixed the SSE connection issue in McpHub.ts. The problem was that the transport.start override was being applied to all transport types when it should only apply to stdio transports. The fix ensures that SSE and streamable-http transports retain their original start methods while stdio transports get the no-op override after being pre-started.

Test Procedure

Type of Change

  • 🐛 Bug Fix: Non-breaking change that fixes an issue.
  • New Feature: Non-breaking change that adds functionality.
  • 💥 Breaking Change: Fix or feature that would cause existing functionality to not work as expected.
  • ♻️ Refactor: Code change that neither fixes a bug nor adds a feature.
  • 💅 Style: Changes that do not affect the meaning of the code (white-space, formatting, etc.).
  • 📚 Documentation: Updates to documentation files.
  • ⚙️ Build/CI: Changes to the build process or CI configuration.
  • 🧹 Chore: Other changes that don't modify src or test files.

Pre-Submission Checklist

  • Issue Linked: This PR is linked to an approved GitHub Issue (see "Related GitHub Issue" above).
  • Scope: My changes are focused on the linked issue (one major feature/fix per PR).
  • Self-Review: I have performed a thorough self-review of my code.
  • Code Quality:
    • My code adheres to the project's style guidelines.
    • There are no new linting errors or warnings (npm run lint).
    • All debug code (e.g., console.log) has been removed.
  • Testing:
    • New and/or updated tests have been added to cover my changes.
    • All tests pass locally (npm test).
    • The application builds successfully with my changes.
  • Branch Hygiene: My branch is up-to-date (rebased) with the main branch.
  • Documentation Impact: I have considered if my changes require documentation updates (see "Documentation Updates" section below).
  • Changeset: A changeset has been created using npm run changeset if this PR includes user-facing changes or dependency updates.
  • Contribution Guidelines: I have read and agree to the Contributor Guidelines.

Screenshots / Videos

image

All 3 (stdio, sse, mcp) happy

Documentation Updates

Additional Notes

Get in Touch


Important

Fixes SSE connection issue in McpHub.ts by ensuring transport.start is only overridden for stdio transports.

  • Behavior:
    • Fixes SSE connection issue in McpHub.ts by ensuring transport.start is only overridden for stdio transports.
    • SSE and streamable-http transports retain original start methods.
  • Error Handling:
    • Adds onclose handler for transport to update server status to "disconnected" and notify webview.
  • Misc:
    • Removes unnecessary connection.server.instructions assignment.

This description was created by Ellipsis for 13c41532f7d4bf73b443d2ffbee229d28296f63e. You can customize this summary. It will automatically update as commits are pushed.

@taylorwilsdon taylorwilsdon requested review from cte and mrubens as code owners June 2, 2025 11:20
@dosubot dosubot bot added size:XL This PR changes 500-999 lines, ignoring generated files. bug Something isn't working labels Jun 2, 2025
@taylorwilsdon
Copy link
Contributor Author

Sorry about that! This should resolve #4241, tested with all 3. Will true up the drift in the other files and push up.

@taylorwilsdon taylorwilsdon force-pushed the patch_transport_init branch from 13c4153 to efc3649 Compare June 2, 2025 11:28
@dosubot dosubot bot added size:S This PR changes 10-29 lines, ignoring generated files. and removed size:XL This PR changes 500-999 lines, ignoring generated files. labels Jun 2, 2025
Copy link
Collaborator

@mrubens mrubens left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the quick fix!

@dosubot dosubot bot added the lgtm This PR has been approved by a maintainer label Jun 2, 2025
@taylorwilsdon
Copy link
Contributor Author

Thanks for the quick fix!

No worries, sorry about that! Was feeling very good about my testing until I realized I don't use any sse endpoints anymore 😂 Had to find a hosted one from cloudflare.

@mrubens mrubens merged commit 6423fc3 into RooCodeInc:main Jun 2, 2025
11 checks passed
@github-project-automation github-project-automation bot moved this from Triage to Done in Roo Code Roadmap Jun 2, 2025
@github-project-automation github-project-automation bot moved this from New to Done in Roo Code Roadmap Jun 2, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working lgtm This PR has been approved by a maintainer size:S This PR changes 10-29 lines, ignoring generated files.

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

Issue: Unable to connect to the SSE MCP server.

2 participants